home *** CD-ROM | disk | FTP | other *** search
/ Light ROM 1 / LIGHT-ROM 1 (Amiga Library Services)(1994).iso / ffdisks / d998.lha / TeXPrt / source / TexPrt.h < prev    next >
C/C++ Source or Header  |  1994-04-05  |  8KB  |  209 lines

  1. /***************************************************************************
  2.  *                                                                         *
  3.  *  Filename : TeXPrt.h                                                    *
  4.  *                                                                         *
  5.  *  Description : Header file for TeXPrt.c                                 *
  6.  *                                                                         *
  7.  ***************************************************************************
  8.  *                                                                         *
  9.  *                         Modification History                            *
  10.  *                                                                         *
  11.  *  Date      Author       Comments                                        *
  12.  * ----------------------------------------------------------------------  *
  13.  * 25.10.92   R.Bödi       Created.                                        *
  14.  *  2.11.93   R.Bödi       Changed structure tags raw_HOffset, cmd_HOffset,*
  15.  *                         raw_VOffset and cmd_VOffset in struct TeXDriver *
  16.  *                         to ***_HOffset[2] and ***_VOffset[2] to enable  *
  17.  *                         parameters of the form -h10truemm which is used *
  18.  *                         in DVIPrint 1.19 for horizontal offset.         *
  19.  *                         cmd_HOffset[0] contains the switch "-h" and     *
  20.  *                         cmd_HOffset[1] is filled with the keyword "true"*
  21.  * 12.2.94    R.Bödi       Changed structure tags Option_1 .. Option_5     *
  22.  *                         to an option array.                             *
  23.  * 16.2.94    R.Bödi       Split struct TeXDriver into separate structures *
  24.  *                         called TeXDriver, RawSettings,                  *
  25.  *                         ParsedSettings, and DefaultSettings.            *
  26.  *  2.3.94    R.Bödi       Added tags DVIFile and Misc to structures       *
  27.  *                         RawSettings and ParsedSettings.                 *
  28.  *                                                                         *
  29.  ***************************************************************************
  30.  *                                                                         *
  31.  * Copyright © 1993-1994 Richard Bödi,  All rights reserved.               *
  32.  *                                                                         *
  33.  ***************************************************************************/
  34.  
  35. /*----------------------------- INCLUDES ----------------------------------*/
  36.  
  37. #include "stdlib.h"
  38. #include "stdio.h"
  39. #include "string.h"
  40. #include "dos.h"
  41.  
  42. #define INTUITION_IOBSOLETE_H
  43.  
  44. #include "graphics/displayinfo.h"
  45. #include "intuition/intuition.h"
  46. #include "intuition/screens.h"
  47. #include "intuition/classes.h"
  48. #include "intuition/classusr.h"
  49. #include "intuition/imageclass.h"
  50. #include "intuition/gadgetclass.h"
  51. #include "workbench/workbench.h"
  52. #include "workbench/startup.h"
  53. #include "utility/tagitem.h"
  54. #include "libraries/gadtools.h"
  55. #include "libraries/asl.h"
  56. #include "libraries/mui.h"
  57.  
  58. #include "clib/alib_protos.h"
  59. #include "clib/exec_protos.h"
  60. #include "clib/dos_protos.h"
  61. #include "clib/graphics_protos.h"
  62. #include "clib/intuition_protos.h"
  63. #include "clib/gadtools_protos.h"
  64. #include "clib/icon_protos.h"
  65. #include "clib/wb_protos.h"
  66. #include "clib/utility_protos.h"
  67. #include "clib/asl_protos.h"
  68. #include "clib/muimaster_protos.h"
  69.  
  70. #include "pragmas/exec_pragmas.h"
  71. #include "pragmas/dos_pragmas.h"
  72. #include "pragmas/graphics_pragmas.h"
  73. #include "pragmas/intuition_pragmas.h"
  74. #include "pragmas/gadtools_pragmas.h"
  75. #include "pragmas/icon_pragmas.h"
  76. #include "pragmas/wb_pragmas.h"
  77. #include "pragmas/utility_pragmas.h"
  78. #include "pragmas/rexxsyslib_pragmas.h"
  79. #include "pragmas/asl_pragmas.h"
  80. #include "pragmas/muimaster_pragmas.h"
  81.  
  82. /*--------------------------- DEFINES -------------------------------------*/
  83.  
  84. #define  BUFFERLENGTH   128
  85. #define  NAMELENGTH      32
  86. #define  MAXLOGOLENGTH   80
  87. #define  CMDLENGTH       64
  88. #define  CMDSTRLENGTH   512
  89. #define  OPTIONS         10
  90.  
  91. #define  STDITEMS         6   // Number of menu items in the project menu.
  92.  
  93.  
  94. /*---------------------- STRUCTURE DEFINITIONS ---------------------------*/
  95.  
  96. enum PageSel              { DOCUMENT, FROMTO };
  97. enum PageType             { ALL, ODD, EVEN };
  98. enum Orientation          { PORTRAIT, LANDSCAPE };
  99. enum MUIElements          { ID_PAGESEL = 0, ID_FROM_PAGE, ID_TO_PAGE, ID_PAGETYPE,
  100.                             ID_ORIENTATION, ID_NO_COPIES, ID_HOFFSET, ID_VOFFSET,
  101.                             ID_HOFFSET_UNIT, ID_VOFFSET_UNIT,
  102.                             ID_OPTION = 10, ID_OPTION_TXT = ID_OPTION + OPTIONS,
  103.                             ID_DVIFILE = ID_OPTION_TXT + OPTIONS, ID_GETFILE_IN,
  104.                             ID_OUTFILE, ID_GETFILE_OUT,
  105.                             ID_QUIT, ID_PRINT, ID_PRINTAREXX,
  106.                             ID_SAVE, ID_SAVEAS, ID_ABOUT, 
  107.                             ID_TOFRONT, ID_TOBACK, ID_SCREENTOFRONT, ID_SCREENTOBACK,
  108.                             ID_DRIVER,
  109.                             LAST_ID };
  110. enum Keywords             { KW_SHELL, KW_FILE, KW_APPICON, LAST_KW };
  111.  
  112.  
  113. struct Status
  114.    {
  115.    BOOL     Print;
  116.    BOOL     Exit;
  117.    BOOL     ARexx;
  118.    };
  119.  
  120. struct Args
  121.    {
  122.    long      ArgPtr[LAST_KW];
  123.    char      ArgStr[LAST_KW][FMSIZE];              // FMSIZE see file dos.h
  124.    };
  125.  
  126. struct AvailDrivers
  127.    {
  128.    int      NoOfDrivers;
  129.    char    *DriverFiles;
  130.    char    *DriverNames;
  131.    };
  132.  
  133. struct TeXDriver
  134.    {
  135.    char  DriverName[CMDLENGTH];                    // Name of printer driver
  136.    char  ProgramNode[FMSIZE];                      // Full path of the printer driver
  137.    };
  138.  
  139. struct RawSettings
  140.    {
  141.    char  PageSel[CMDLENGTH];                       // unparsed settings
  142.    char  Copies[CMDLENGTH];
  143.    char  PageType[CMDLENGTH];
  144.    char  HOffset[CMDLENGTH], VOffset[CMDLENGTH];
  145.    char  HOffsetUnit[CMDLENGTH], VOffsetUnit[CMDLENGTH];
  146.    char  HOffsetTxt[CMDLENGTH], VOffsetTxt[CMDLENGTH];
  147.    char  Orientation[CMDLENGTH];
  148.    char  Option[OPTIONS][CMDLENGTH];
  149.    char  OptionTxt[OPTIONS][CMDLENGTH];
  150.    char  Device[CMDLENGTH];
  151.    char  DVIFile[CMDLENGTH];
  152.    char  Misc[CMDLENGTH];
  153.    };
  154.  
  155. struct ParsedSettings
  156.    {
  157.    char  From[CMDLENGTH], To[CMDLENGTH];           // parsed setting strings
  158.    char  NoOfPages[CMDLENGTH];
  159.    char  Copies[CMDLENGTH];
  160.    char  AllPages[CMDLENGTH];
  161.    char  OddPages[CMDLENGTH];
  162.    char  EvenPages[CMDLENGTH];
  163.    char  HOffset[CMDLENGTH], VOffset[CMDLENGTH];
  164.    char  HOffsetUnit[CMDLENGTH], VOffsetUnit[CMDLENGTH];
  165.    char  HOffsetTxt[CMDLENGTH], VOffsetTxt[CMDLENGTH];
  166.    char  Portrait[CMDLENGTH];
  167.    char  LandScape[CMDLENGTH];
  168.    char  Option[OPTIONS][CMDLENGTH];
  169.    char  OptionTxt[OPTIONS][CMDLENGTH];
  170.    char  Device[CMDLENGTH];
  171.    char  DVIFile[CMDLENGTH];
  172.    char  Misc[CMDLENGTH];
  173.    };
  174.  
  175. struct DefaultSettings
  176.    {
  177.    enum PageSel      PageSel;                      // default settings
  178.    unsigned long     Copies;
  179.    enum PageType     PageType;
  180.    enum Orientation  Orientation;
  181.    long              HOffset, VOffset;
  182.    long              AdjHOffset, AdjVOffset;       // adjustment for origin
  183.    BOOL              Option[OPTIONS];
  184.    char              DeviceName[CMDLENGTH];
  185.    };
  186.  
  187. struct MUIPointers
  188.    {
  189.      APTR    app, MainWindow, STR_DVIFile, IMG_In, STR_OutFile, IMG_Out, RAD_FromTo;
  190.     APTR    STR_From, STR_To, RAD_OddEven, STR_Copies, RAD_Orientation, STR_X, TXT_X;
  191.     APTR    STR_Y, TXT_Y, CHM_Option[OPTIONS], TXT_Option[OPTIONS];
  192.     APTR    BUT_Quit, BUT_Print;
  193.    };
  194.  
  195.  
  196. struct StructPointers
  197.    {
  198.    struct AvailDrivers    *AvailDrivers;
  199.    struct TeXDriver       *TeXDriver;
  200.    struct RawSettings     *RawSettings;
  201.    struct ParsedSettings  *ParsedSettings;
  202.    struct DefaultSettings *DefaultSettings;
  203.    struct MUIPointers     *MUIPointers;
  204.    BOOL                    ARexxAvailable;
  205.    USHORT                  DriverNumber;
  206.    };
  207.  
  208. /*----------------------- END OF HEADER FILE ---------------------------*/
  209.